package com.zhan.excel_deal.listenner;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.zhan.excel_deal.entity.Parent;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class ParentListener extends AnalysisEventListener<Parent> {

    private List<Parent> datas = new ArrayList<>();

    public List<Parent> getDatas() {
        return this.datas;
    }

    public void invoke(Parent parent, AnalysisContext analysisContext) {
        this.datas.add(parent);
    }

    public void doAfterAllAnalysed(AnalysisContext analysisContext) {}
}
